<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    
    //if 分支语句
    
  /* var age = 16;
    if (age >= 18){
        console.log("你以成年");
    } else{
         console.log("你未成年");
     }

    /* var max= prompt("请输入年龄")
    var age = max;
    if (age >= 18){
        console.log("你以成年");
    } else{
         console.log("你未成年");
     }*/
     


    /* var scar= prompt("请输入你的成绩")
     if(scar<=100&&scar>=90){
        console.log("优秀");
     }else if(scar>=80&&scar<90){
         console.log("一般");
     }else if (scar>=60&&scar<80){
         console.log("及格");
     }else if (scar>=0&&scar<60){
         console.log("不及格");
     }else{
         console.log("否则不合法");
     }*/
    /*var ast= prompt("请输入年龄")
     var year =ast
     if(year %4 ==0&&year %100 !==0 ||year %400 ==0){
         console.log(year+"年");
     }
     else{
         console.log( year +"不是润年");
     }*/


    /* var year ="2018";
     if(year %4 ==0&&year %100 !==0 ||year %400 ==0){
         console.log(year+"年");
     }
     else{
         console.log( year +"不是润年");
     }*/
    // var one = prompt("数值")
    //  var two = prompt("符号")
    //  var three = prompt("数字2")
    //  var sum;   
    //  switch(two){
    //      case"+":sum = Number(one) + Number(three);break
    //      case"-":sum = Number(one) - Number(three);break
    //      case"*":sum = Number(one) * Number(three);break
    //      case"/":sum = Number(one) / Number(three);break
    //  } alert(sum)
     /* if(two =="+"){
       sum =  Number(one) +Number (three)
     }
     else if (two == "-"){
        sum =   Number(one) +Number (three)
     }
     else if(two =="*"){
        sum =  Number(one) +Number (three)
     }
      else if(two =="/"){   
        sum =  Number(one) +Number (three)
     }
     alert(sum)*/
  
</script>